/*
 * @Description:
 * @author:
 * @since: yyyy-MM-dd
 * @page: xxxx.vue
 */
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/home/index.vue'),
    },
    // 宫格视频   grid布局
    {
      path: '/tabVideo',
      name: 'tabVideo',
      component: () => import('@/views/videoTest/index.vue'),
    },
    // flex写五宫格
    {
      path: '/fiveGrid',
      name: 'fiveGrid',
      component: () => import('@/views/videoTest/fiveGrid.vue'),
    },
    // tab切换视频
    {
      path: '/gridVideo',
      name: 'gridVideo',
      component: () => import('@/views/videoTest/gridVideo.vue'),
    },
    {
      path: '/3DBanner',
      name: '3DBanner',
      component: () => import('../views/3DBanner.vue'),
    },
    // 文本域回显表格数据，可换行
    {
      path: '/textValue',
      name: 'textValue',
      component: () => import('../views/textValue.vue'),
    },

    {
      path: '/date',
      name: 'date',
      component: () => import('../views/date.vue'),
    },
    // 滚动出现广告
    {
      path: '/advertisement',
      name: 'advertisement',
      component: () => import('../views/advertisement.vue'),
    },
    {
      path: '/map',
      name: 'map',
      component: () => import('../views/map.vue'),
    },
    {
      path: '/echartsDemo',
      name: 'echartsDemo',
      component: () => import('../views/echartsDemo.vue'),
    },
    {
      path: '/echartScatter',
      name: 'echartScatter',
      component: () => import('../views/echarts/echartScatter.vue'),
    },
    {
      path: '/test',
      name: 'test',
      component: () => import('../views/table/test.vue'),
    },
    {
      path: '/GanttChart',
      name: 'GanttChart',
      component: () => import('../views/echarts/projectProgress/index.vue'),
    },
    {
      path: '/safeManage',
      name: 'safeManage',
      component: () => import('../views/safeManage.vue'),
    },
    {
      path: '/animation',
      name: 'animation',
      component: () => import('../views/animation.vue'),
    },
    {
      path: '/dialog',
      name: 'dialog',
      component: () => import('../views/elementDialog.vue'),
    },
    {
      path: '/zhunchi',
      // component: Layout,
      redirect: '/zhunchi/level1-2/level2-3',
      name: 'zhunchi',
      meta: { title: '准池线', icon: 'user' },
      children: [
        {
          path: 'level1-1',
          component: () => import('@/views/xinshuo/level1/index.vue'),
          name: 'level1-1',
          meta: { title: '高家堡站' },
          redirect: '/zhunchi/level1-2/level2-1',
        },
        {
          path: 'level1-2',
          component: () => import('@/views/xinshuo/level1/index.vue'),
          name: 'level1-2',
          meta: { title: '卧厂站' },
          redirect: '/zhunchi/level1-2/level2-1',
          children: [
            {
              path: 'level2-1',
              component: () => import('@/views/xinshuo/level1/level2/level2-1.vue'),
              name: 'level2-1',
              meta: { title: '更换钢轨', status: '已完成' },
            },
            {
              path: 'level2-2',
              component: () => import('@/views/xinshuo/level1/level2/level2-1.vue'),
              name: 'Level2-2',
              meta: { title: '捣固、改造', status: '已完成' },
            },
            {
              path: 'level2-3',
              component: () => import('@/views/xinshuo/level1/level2/level2-3.vue'),
              name: 'Level2-3',
              meta: {
                title: '高柱信号机及表示器检修',
                status: '已完成',
                type: 'denggao',
              },
            },
          ],
        },
      ],
    },
    {
      path: '/scrollTab',
      name: 'scrollTab',
      component: () => import('../views/scrollTab.vue'),
    },
  ],
})

export default router
